/**
 * User: alesj
 * Date: 18.3.2006
 * Time: 16:09:36
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.alesj.blade.data;

import javax.persistence.*;
import java.util.Set;

/**
 * @author <a href="mailto:ales.justin@genera-lynx.com">Ales Justin</a>
 */
@Entity
@Table(name = "FRAME")
public class Frame extends Rectangle {

    Request request;
    Set<Piece> pieces;

    @ManyToOne
    @JoinColumn(name = "REQUEST_ID", unique = false, nullable = false, insertable = true, updatable = true)
    public Request getRequest() {
        return request;
    }

    public void setRequest(Request request) {
        this.request = request;
    }

    @OneToMany(mappedBy = "frame")
    public Set<Piece> getPieces() {
        return pieces;
    }

    public void setPieces(Set<Piece> pieces) {
        this.pieces = pieces;
    }

}
